<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'editClient_main.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="css/left_tabmenu.css">
	<script type="text/javascript" src="js/showmenu.js"></script>
	<link rel="stylesheet" type="text/css"
			href="js/ext/resources/css/ext-all.css" />
		<script type="text/javascript" src="js/ext/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="js/ext/ext-all.js"></script>
		<script type="text/javascript" src="js/date.js"></script>
	
	<style type="text/css">
	.basic_info{
font-size:12;
}
.basic_info td{width:20%;}
.basic_info input{
BORDER-RIGHT: gray 1px solid;
	BORDER-TOP: gray 1px solid;
	BORDER-LEFT: gray 1px solid;
	BORDER-BOTTOM: gray 1px solid;
	FONT-FAMILY: verdana;
	BACKGROUND-COLOR: window;
	width:140;
	height:21;
}
.content{text-align:left;}
.item{text-align:right;}
	
	</style>
<script language="javascript">  
var XMLHttpReq;  
     //创建XMLHttpRequest对象         
    function createXMLHttpRequest() {  
        if(window.XMLHttpRequest) { //Mozilla 浏览器  
            XMLHttpReq = new XMLHttpRequest();  
        }  
        else if (window.ActiveXObject) { // IE浏览器  
            try {  
                XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");  
            } catch (e) {  
                try {  
                    XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");  
                } catch (e) {}  
            }  
        }  
    }  
    //发送请求函数  
    function sendRequest(url) {  
        createXMLHttpRequest();  
        XMLHttpReq.open("GET", url, true);  
        XMLHttpReq.onreadystatechange = processResponse;//指定响应函数  
        XMLHttpReq.send(null);  // 发送请求  
    }  
    // 处理返回信息函数  
    function processResponse() {  
        if (XMLHttpReq.readyState == 4) { // 判断对象状态  
            if (XMLHttpReq.status == 200) { // 信息已经成功返回，开始处理信息  
                updateMenu();  
            } else { //页面不正常  
                  alert("获取行业列表异常！");  
            }  
        }  
    }  
    //更新菜单函数  
    function updateMenu() {  
    	if(XMLHttpReq.responseText != ""){
    	
        var industryChild=XMLHttpReq.responseText;

        var indChildJSON= eval("(" + industryChild + ")");
        
        var industryObj = document.getElementById('industryLevelTwo');
       
        industryObj.options.length=0;
        for(var i in indChildJSON){ 
       	var opt =new Option(indChildJSON[i], i);
       	industryObj.options.add(opt);
		}
		}
		  
    }  
    // 创建级联菜单函数  
    function showSubMenu(obj) {  
        sendRequest("industryCascading.do?industryParent=" + obj );  
        /**下面这一句的作用是：每次选择后回到第一个选项**/  
        // document.all.mli.options[0].selected=true;  
    }  
  
</script>
  </head>
 <body>
 <table width="100%" height="100%">
 <tr><td height="20%">
<div id="top">
<table  width="100%">
<tr><td><jsp:include page="../top.jsp" flush="true"></jsp:include></td></tr>
</table>
</div>
</td></tr>
<!--
<hr   size= "1 "   noshade   style= "color:#BCD2EE;   border-style:dotted; "> 
-->
<tr><td height="70%" style="vertical-align:top;">
<div id="main">
<table width="100%" height="100%">
<tr>
<td width="20%" height="100%" style="vertical-align:top;border-right:4px #65aaef solid;">
<div id="nav">  
  <div class="title1" id="menu1" onclick="showmenu('1') ">→基本信息</div>
  <div id="list1" class="content" style="display:block">
       <ul>
<li><a href="customer/addGeneral.do?custId=${CustInfo.custId}&isView=1">- 概况</a></li>
<li><a href="view/customer/Customer_Address.jsp">- 地址</a></li>
<li><a href="customer/addOperation.do?custId=${CustInfo.custId}&isView=1">- 经营情况</a></li>
<li><a href="view/customer/Customer_Management.jsp">- 管理层情况</a></li>
<li><a href="dispatch.do?type=Cust_Overview&custId=${custId}">- 总览</a></li> 
    </ul>
  </div> 
 <div class="title" id="menu2" onclick="showmenu('2')"><a href="view/customer/Customer_ReportList.jsp" style="text-decoration: none;color:#fff;">→财务信息</a></div>
  <div id="list2" class="content" style="display:none">
    <ul>
    </ul>
  </div> 
<div class="title" id="menu3" onclick="showmenu('3')">→集团客户信息</div>
  <div id="list3" class="content" style="display:none">
    <ul>
<li><a href="#" title="">- 成员信息</a></li>
<li><a href="#" title="">- 集团信息</a></li>
    </ul>
  </div> 
  <div class="title" id="menu4" onclick="showmenu('4')">→银企合作信息</div>
  <div id="list4" class="content" style="display:none">
    <ul>
<li><a href="view/customer/Customer_Inner.jsp">- 我行存贷款信息</a></li>
<li><a href="view/customer/Customer_Outer.jsp">- 他行存贷款信息</a></li>
<li><a href="view/customer/Customer_Guarantee.jsp">- 担保信息</a></li>
    </ul>
  </div> 
    <div class="title" id="menu5" onclick="showmenu('5')">→历史评级信息</div>  
    <div id="list5" class="content" style="display:none">
    <ul>
<li><a href="view/customer/Customer_ExtratRating.jsp">- 外部评级</a></li>
<li><a href="view/customer/AddCustomer_Rating.jsp">- 内部评级</a></li>
    </ul>
  </div> 
<div class="title" id="menu6" onclick="showmenu('6')"><a href="view/customer/Customer_Events.jsp" style="text-decoration: none;color:#fff;">→重大事项</a></div>  
</div>
</td>
<td width="80%" height="100%" style="vertical-align:top" id="right_frame">
<div id="position" align="left">
			<font size="2">当前位置： <a href="" style="text-decoration: none;">首页</a>&gt;&gt;客户管理&gt;&gt;新增客户</font>
		</div>
		<hr />
		<br/>
		<div align="left">
			<img src="images/edit.png" alt="" width="24" height="24"/>
			<font size="2">概况</font>
		</div>
		<hr />

		<div>
			<div>
				<div>
<form action="customer/addGeneral.do" method="post">
<table width="80%"  border=0 align="center"  cellpadding="2" cellspacing="10" class="basic_info">
<tr>
<td class="item" width="20%">客户类型</td>
<c:set value="${DataDictionary['CustType'][custType]}" var="type" scope="page"> </c:set>
<td class="content"><input name="custTypeValue" type="text" value="${DataDictionary['CustType'][CustInfo.custType]}" disabled="disabled" class="input_B">
</td>
<td>&nbsp;</td><td><input name="custType" type="hidden" value='${CustInfo.custType}'/></td>
</tr>
<tr>
<td class="item">客户名称</td>
<td class="content"><input name="custName" type="text" class="input_B" value='${CustInfo.custName}' readonly="readonly">
</td>
<td class="item">客户简称</td>
<td class="content"><input name="simpleName" type="text" class="input_B" value='${CustInfo.simpleName}'></td>
</tr>
<tr>
<td class="item">组织机构代码</td>
<td class="content"><input name="organizationId" type="text" class="input_B" value='${CustInfo.organizationId}' readonly="readonly">
</td>
<td class="item">营业执照代码</td>
<td class="content"><input name="busiLicenseId" type="text" class="input_B" value='${CustInfo.busiLicenseId}' readonly="readonly">
</td>
</tr>
<tr>
<td class="item">客户名称（英文）</td>
<td class="content"><input name="englishName" type="text" value='${CustInfo.englishName}' class="input_B">
</td>
<td class="item"> 客户简称（英文）</td>
<td class="content"><input name="simpleEnName" type="text" class="input_B" value='${CustInfo.simpleEnName}'>
</td>
</tr>
<tr>
<td class="item">所有制类别</td>
<td class="content">
<select name="belongType" class="select">

<c:if test="${not empty CustInfo.belongType}">
   <option value="<c:out value="${CustInfo.belongType}" />">
   <c:out value="${DataDictionary['BelongType'][CustInfo.belongType]}" /></option>
</c:if>

<c:forEach var="entry" items="${DataDictionary['BelongType']}">
   <option value="<c:out value="${entry.key}" />"><c:out value="${entry.value}" /></option>
</c:forEach>
</select>
     </td>
<td class="item">组织类别</td>
<td class="content"><select name="orgType" class="select">

<c:if test="${not empty CustInfo.orgType}">
   <option value="<c:out value="${CustInfo.orgType}" />">
   <c:out value="${DataDictionary['OrgType'][CustInfo.orgType]}" /></option>
</c:if>

<c:forEach var="entry" items="${DataDictionary['OrgType']}">
<option value="<c:out value="${entry.key}" />"><c:out value="${entry.value}" /></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td class="item">成立时间</td>
<td class="content"><input name="establishDate" type="text" id="establishing_time" value='${CustInfo.establishDate}'>
</td>
<td class="item">财年截止日期</td>
<td class="content"><input name="closeDate" type="text" class="input_B" id="fiscal_deadline_time" value='${CustInfo.closeDate}'>
</td>
</tr>
<tr>
<td class="item">注册资本</td>
<td class="content" colspan="3"><input name="registercapital" type="text" class="input_B" value='${CustInfo.registercapital}'>
<select name=capitalCurrency class="select">

<c:if test="${not empty CustInfo.capitalCurrency}">
   <option value="<c:out value="${CustInfo.capitalCurrency}" />">
   <c:out value="${DataDictionary['Currency'][CustInfo.capitalCurrency]}" /></option>
</c:if>

<c:forEach var="entry" items="${DataDictionary['Currency']}">
   <option value="<c:out value="${entry.key}" />"><c:out value="${entry.value}" /></option>
     </c:forEach>
     </select>
     
<span>（单位：百万）</span>
</td>
</tr>
<tr>
<td class="item">注册资本到位率</td>
<td class="content"><input name="receiveRate" type="text" class="input_B" value="${CustInfo.receiveRate}">
</td>
<!--<td class="btitle">财政收入来源</td>
<td class="bcontent"><select name="revenueSource" class="select">
<option value="全额拨款" selected>全额拨款</option>
<option value="差额拨款">差额拨款</option>
<option value="自收自支">自收自支</option>
</select>
</td>
--></tr>
<tr>
<td class="item">客户状态</td>
<td class="content"><select name="custStatus" class="select">

<c:if test="${not empty CustInfo.custStatus}">
   <option value="<c:out value="${CustInfo.custStatus}" />">
   <c:out value="${DataDictionary['CustStatus'][CustInfo.custStatus]}" /></option>
</c:if>

<c:forEach var="entry" items="${DataDictionary['CustStatus']}">
<option value="<c:out value="${entry.key}" />"><c:out value="${entry.value}" /></option>
</c:forEach>
</select>
</td>
<td class="item">企业规模</td>
<td class="content"><select name="custScope" class="select">

<c:if test="${not empty CustInfo.custScope}">
   <option value="<c:out value="${CustInfo.custScope}" />">
   <c:out value="${DataDictionary['CustScope'][CustInfo.custScope]}" /></option>
</c:if>

<c:forEach var="entry" items="${DataDictionary['CustScope']}">
<option value="<c:out value="${entry.key}" />"><c:out value="${entry.value}" /></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td class="item">行业类型</td>
<td class="content" colspan="3">
<select  class="select" id="industryLevelOne" onchange="showSubMenu(this.options[this.options.selectedIndex].value)">
<option value=''>请选择...</option> 
<c:forEach var="entry" items="${Industry}">
<option value="<c:out value="${entry.key}" />"><c:out value="${DataDictionary['IndustryType'][entry.key]}" /></option>
</c:forEach>
</select>
<select id="industryLevelTwo" name="industryType" class="select">
<c:if test="${not empty CustInfo.industryType}">
   <option value="<c:out value="${CustInfo.industryType}" />">
   <c:out value="${DataDictionary['IndustryType'][CustInfo.industryType]}" /></option>
</c:if>
</select>
*</td>
</tr>
</table>
<input type="hidden" name="custId" value="${CustInfo.custId}"/>
				</div>
			</div>
			<br />
			<div align="center" id="button">
				<input type="submit" value="保存" name="save">
				&nbsp;&nbsp;&nbsp;
				<input type="reset" value="取消" name="reset">

			<table><tr><td id="save"></td><td width="20"></td><td id="reset"></td></tr></table>
			</div>
		</div>
		</form>
</td>
</tr>
</table>

</div>
</td></tr>
<!--<hr   size= "1 "   noshade   style= "color:#BCD2EE;   border-style:dotted; "> 
-->
<tr><td height="10%" style="vertical-align:bottom;">
<div id="footer">
<table  width="100%">
<tr><td style="vertical-align:bottom;text-align:center;"><jsp:include page="../bottom.jsp"></jsp:include></td></tr>
</table>
</div>
</td></tr>
</table>
  </body>
</html>
